package com.safewind.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.safewind.dao.SendDao;
import com.safewind.model.Send;
import com.safewind.service.ISendService;

@Service("sendService")
public class SendServiceImpl implements ISendService {

	@Resource
	private SendDao sendDao;

	@Override
	public void addSend(Send send) {
		sendDao.insertSelective(send);
	}

	@Override
	public Send getSendById(String id) {
		return sendDao.selectByPrimaryKey(id);
	}

	@Override
	public void updateSend(Send send) {
		sendDao.updateByPrimaryKeySelective(send);
	}

	@Override
	public void deleteSendById(String id) {
		sendDao.deleteByPrimaryKey(id);
	}

	@Override
	public List<Send> getAllByUserId(String userId) {
		return sendDao.getAllByUserId(userId);
	}

	@Override
	public List<Send> getAllQuartzByUserId(String userId) {
		return sendDao.getAllQuartzByUserId(userId);
	}

}
